home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / CUGUK / PROG_TOO / C027B.ZIP / JAS / HDR.C < prev    next >
Text File  |  1990-03-30  |  1KB  |  49 lines

  1.  
  2. /*
  3.  * Copyright (c) 1988 by Sozobon, Limited.  Author: Joseph M Treat
  4.  *
  5.  * Permission is granted to anyone to use this software for any purpose
  6.  * on any computer system, and to redistribute it freely, with the
  7.  * following restrictions:
  8.  * 1) No charge may be made other than reasonable charges for reproduction.
  9.  * 2) Modified versions must be clearly marked as such.
  10.  * 3) The authors are not responsible for any harmful consequences
  11.  *    of using this software, even if they result from defects in it.
  12.  */
  13.  
  14. #include "jas.h"
  15.  
  16. /* for megamax */
  17. #define entry _entry
  18.  
  19. typedef struct {
  20.     int magic;
  21.     long tsize;
  22.     long dsize;
  23.     long bsize;
  24.     long ssize;
  25.     long stksize;
  26.     long entry;
  27.     int rlbflg;
  28. } HEADER;
  29.  
  30. #define MAGIC    0x601a
  31. #define SYMSIZE    14
  32.  
  33. headers()
  34. {
  35.     HEADER header;
  36.     extern long txtsize, datsize, bsssize, nsyms;
  37.  
  38.     header.magic = MAGIC;
  39.     header.tsize = txtsize;
  40.     header.dsize = datsize;
  41.     header.bsize = bsssize;
  42.     header.ssize = nsyms * SYMSIZE;
  43.     header.stksize = 0L;
  44.     header.entry = 0L;
  45.     header.rlbflg = 0;
  46.  
  47.     output( (char *) &header, sizeof header, 1 );
  48. }
  49.